file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "N/A")

set(PROBLEM_TEXT "")
if("build-dir" IN_LIST FEATURES)
    string(APPEND PROBLEM_TEXT "build-dir: ${CURRENT_BUILDTREES_DIR}\n")
endif()
if("downloads" IN_LIST FEATURES)
    string(APPEND PROBLEM_TEXT "downloads: ${DOWNLOADS}\n")
endif()
if("installed-root" IN_LIST FEATURES)
    string(APPEND PROBLEM_TEXT "installed-root: ${CURRENT_INSTALLED_DIR}\n")
endif()
if("package-dir" IN_LIST FEATURES)
    string(APPEND PROBLEM_TEXT "package-dir: ${CURRENT_PACKAGES_DIR}\n")
endif()
if("pkgconfig" IN_LIST FEATURES)
    file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/pkgconfig")
    file(WRITE "${CURRENT_PACKAGES_DIR}/share/pkgconfig/vcpkg-policy-absolute-paths.pc" "${PROBLEM_TEXT}")
endif()

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/vcpkg-policy-absolute-paths.h" "${PROBLEM_TEXT}")

file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
file(WRITE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/port-config.sh" "${PROBLEM_TEXT}")

if("policy" IN_LIST FEATURES)
    set(VCPKG_POLICY_SKIP_ABSOLUTE_PATHS_CHECK enabled)
endif()
